import re
s=input()
ch=input()
st=0
ans=0
while(st<len(s) and st!=-1):
    st=s.find(ch,st)
    if st!=-1:
        ans+=1
        st+=1
print(ans)